package com.zbs.framework.dao.permission.entity;

import com.zbs.framework.dao.base.BaseEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 权限
 */
@Entity
@Table(name = "mnt_permission")
@Getter
@Setter
@NoArgsConstructor
@ToString
public class Permission extends BaseEntity {

    /**
     * 所属服务名
     */
    private String serviceName;
    /**
     * 权限名
     */
    private String name;
    /**
     * 描述
     */
    private String description;
    /**
     * 其他信息
     */
    private String extra;

    /**
     * 接口路径
     */
    private String path;

    public Permission(String serviceName, String name,
                      String description, String extra,
                      String path) {
        this.serviceName = serviceName;
        this.name = name;
        this.description = description;
        this.extra = extra;
        this.path = path;
    }

    public Permission(String serviceName, String name, String path) {
        this.serviceName = serviceName;
        this.name = name;
        this.path = path;
    }
}
